

#import <Foundation/Foundation.h>

typedef void(^NetWorkRequestBlock)(id data);
typedef void(^GETNetWorkRequestBlock)(NSDictionary *data);
typedef void (^ErrorRequestBlock)(NSError *error);
@interface NetworkRequest : NSObject{
    
   NSString *json;
    id result;
    BOOL isRequest;
    int number;
    NSData *imagedata;
}
@property (nonatomic,retain)NSMutableData *receiveData;


@property (nonatomic,copy)NetWorkRequestBlock block;
@property (nonatomic,copy)ErrorRequestBlock errorblock;

- (void)SynchronousPostRequestWithURL:(NSString *)url className:(id)className resultBlock:(NetWorkRequestBlock)block;
- (void)SynchronousGetRequestWithURL:(NSString *)url resultBlock:(NetWorkRequestBlock)block;

- (void)postImageToserverWithURL:(NSString *)URL object:(id)object resultBlock:(NetWorkRequestBlock)block;
- (void)SynchronousPostRequestWithURL:(NSString *)url dictionary:(NSDictionary *)dict resultBlock:(NetWorkRequestBlock)block;
- (void)postFeiledToserverWithURL:(NSString *)URL object:(id)object filePath:(NSString *)filePath fileName:(NSString *)fileName resultBlock:(NetWorkRequestBlock)block;
@end
